const common = {};

function isType(type) {
    return obj => Object.prototype.toString.call(obj) === `[object ${type}]`;
}
common.isString = isType('String');
common.isArray = isType('Array');
common.isFunction = isType('Function');

common.getFileName = _fileName => _fileName.split('/').pop().replace('.js', '');

module.exports = common;
